<?php
/**
 * 好友Card
 *
 * @author liuxp <liuxp1981@gmail.com>
 */
class FriendCardWidget extends Widget {

	/**
	 * 可能认识的好友Widget
	 *
	 * $data的参数说明:
	 * array(
	 * )
	 */
	public function render($data) {
		$uid = $_REQUEST['uid'];
		$data['user_info'] = getUserInfo($uid, '', $data['mid'], false);
		$data['user_profile'] = D('UserProfile', 'home')->getProfile($uid);
		$data['isFriend'] = model('Friend')->isFriends($data['mid'], $data['user_info']['uid']);
		$message = getUserName($this->mid) . '加你为好友了';
		$content = $this->renderFile ( ADDON_PATH . '/widgets/system_recommend/FriendCard.html', $data );
		return $content;
	}

}